473,424 Members | 1,928 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,424 software developers and data experts.

adding javascript menu

How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):

<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
Thanks,
Trint

Nov 20 '06 #1
3 1446
All you really need to do is just put it between the Body tags, exactly
where you want it to show. Before, with many pages in my site, I just
created an include file (yes, include), since there's nothing really dynamic
about it, put all the Javascript code in the include, then place the include
file between the body tags, exactly where you want it to show.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"trint" <tr***********@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):

<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
Thanks,
Trint

Nov 20 '06 #2
David,
I did as you said, and it still isn't showing after I do a build and
view in browser.
Thanks,
Trint
David Wier wrote:
All you really need to do is just put it between the Body tags, exactly
where you want it to show. Before, with many pages in my site, I just
created an include file (yes, include), since there's nothing really dynamic
about it, put all the Javascript code in the include, then place the include
file between the body tags, exactly where you want it to show.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"trint" <tr***********@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):

<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
Thanks,
Trint
Nov 20 '06 #3
Hey, I figured it out with this code sample from codeproject here:
http://www.codeproject.com/aspnet/webmenu.asp
trint wrote:
David,
I did as you said, and it still isn't showing after I do a build and
view in browser.
Thanks,
Trint
David Wier wrote:
All you really need to do is just put it between the Body tags, exactly
where you want it to show. Before, with many pages in my site, I just
created an include file (yes, include), since there's nothing really dynamic
about it, put all the Javascript code in the include, then place the include
file between the body tags, exactly where you want it to show.

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"trint" <tr***********@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
How can I add javascript to my code view of my default.aspx file and
get my meny to show?
Here is the code I want to display (it's obviously a menu):
>
<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
<!--//
>
>
new menu (MENU_ITEMS, MENU_POS);
//-->
</script>
>
>
Thanks,
Trint
>
Nov 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
2
by: ste33 | last post by:
Hi, I spent the last hour or so trying to find a simple solution to this but with no success. I'd like to have a select box in a form where a user could select "other" if no option is the...
4
by: Dmitry Korolyov [MVP] | last post by:
When we use btnSubmit.Attributes = "javascript: this.disabled=true;" to make the button disabled and prevent users from clicking it again while form data still posting, there is no longer...
7
by: Joseph Scoccimaro | last post by:
Currently I am trying to use JavaScript within greasemonkey to dynamically put a menu at the top of each page. I am running in to trouble when I try to append a node representing a script tag to...
5
by: z | last post by:
I'm using a horizontal CSS-based dropdown menu based on this code: http://www.weblens.org/templates/sample_menu.html Is there a relatively easy way to add a slight delay to the menu with...
1
by: trint | last post by:
How can I add javascript to my code view of my default.aspx file and get my meny to show? Here is the code I want to display (it's obviously a menu): <!-- menu script itself. you should not...
5
by: Jonathan | last post by:
Hello All, I am in the process of creating a 2/3 level collapsible/exspanible menu (called "nav") where users can click on a category and have the submenus appear beneath it and so on (allow...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
10
by: AC | last post by:
I had a page that does some event setup on window.onload: function prepEvents() { document.getElementById("menumap_sales").onmouseover = swapMenuSales; // etc } window.onload = prepEvents;
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.